home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group02b.txt / 000007_icon-group-sender_Fri Aug 16 16:13:56 2002.msg < prev    next >
Internet Message Format  |  2003-01-02  |  3KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id g7GNDrE22997
  4.     for icon-group-addresses; Fri, 16 Aug 2002 16:13:54 -0700 (MST)
  5. Message-Id: <200208162313.g7GNDrE22997@baskerville.CS.Arizona.EDU>
  6. From: jenjhiz@yahoo.com (Gene Kahn)
  7. X-Newsgroups: comp.lang.icon
  8. Subject: Re: What about "Expressions?" (was Re: Icon Wish List)
  9. Date: 16 Aug 2002 08:38:22 -0700
  10. X-Complaints-To: groups-abuse@google.com
  11. To: icon-group@cs.arizona.edu
  12. Errors-To: icon-group-errors@cs.arizona.edu
  13. Status: RO
  14.  
  15. Hrvoje Blazevic <hrvoje@despammed.com> wrote in message news:<pan.2002.08.15.23.16.43.204175.3145@despammed.com>...
  16. > On Thu, 15 Aug 2002 18:53:13 +0200, Christopher Browne wrote:
  17. [snip]
  18. > Imperative languages use statements -- which results in flow of
  19. > information between different parts of program being passed in the
  20. > form of a variable assignment.
  21. > Statements do not return values, they have side-effects, most notably
  22. > assignment to variables that describe the state of the computation at
  23. > any given moment.
  24. This is not without its advantage, of course. In particular, in terms
  25. of readability, I find that explicit variables allow my mind to
  26. 'close' (I'm not using it in the technical sense of "closure")
  27. previous statements. On the other hand, in reading s-expression
  28. languages like Lisp and Scheme, I find that I have to hold in my mind
  29. too many _unstated_ intermediate results before I find what the
  30. expression is all about. (One could argue that this may be due more to
  31. bad code, i.e., irresponsible use of deep embedding, than to intrinsic
  32. properties of s-expressions). Compare the readability of these chunks
  33. of code:
  34.  
  35. FORTRAN-like
  36. The man kicked the dog.
  37. The dog chased the cat.
  38. The cat bit the mouse.
  39. The mouse died. 
  40.  
  41. LISP-like (in infix notation)
  42. The mouse the cat the dog the man kicked chased bit died.
  43.  
  44. Of course, variable-less, assignment-less languages have advantages. 
  45.  
  46. Speaking of speaking (or writing) grammatical English, which skill has
  47. been implied in a recent post as a 'requisite' for programming, what
  48. do readers with good English grammar think of this sentence:
  49. grammatically correct or not? Be careful with your answer. Your
  50. reputation as a programmer is on the line.
  51.  
  52. The horse raced past the barn collapsed. 
  53.  
  54.  
  55. > Although Icon *is* imperative language it can get away with less state
  56. > variables than most, simply because it uses expressions which return
  57. > values. Therefore smaller chunks of code in Icon do not have to
  58. > describe state as the set of variables.
  59. > I may be getting over my head here, because I'm *not* an Icon
  60. > programmer. I did get briefly involved with Icon about 10 years ago,
  61. > just after several years of down and dirty imperative programming
  62. > using Pascal and C/C++. At that time I read "The Icon Programming
  63. > Language" (2nd edition), and was instantly drawn to Icon. 
  64. > Unfortunately at about the same time my son reached fourth
  65. > grade, and I wanted to start him on a road to CS, so I started looking
  66. > at Logo.
  67. > After that, the road was clear; Logo, Lisp (emacs lisp), Scheme and Haskell.
  68. > I do not think that I'll ever go back to Icon, but I still sometimes
  69. > check the web site, nostalgia ... probably :-)
  70.